Encrypting Passwords in TomEE

It’s a good practice to encrypt the database passwords in tomee.xml. This is taken care of during the run time of the container.

Remove the value of DSPASSWORD from pas_env.dat once the container is up and running.

The Dockerfiles directory structure is as follows:

OIPA Docker TomEE pasjava

Under the scripts home directory (pasjava/scripts)

OIPA Docker TomEE Script

Note: Place the OIPA build artifact which is downloaded from the Oracle Software Delivery Cloud in the externallibs/zip directory. Check the below snippet for your reference.

OIPA Docker TomEE Zip Folder

Under externallibs folder

Docker Image Build

From the Dockerfile location, execute the below command (a sample build.sh file is placed for reference).

docker build format:

$ docker build --network=host -t <Image_Name>:<Image_Tag> --build-arg PAS_PKG="<PAS Package Name>"

docker build example:

$ docker build --network=host -t oipa_tomee:12.2.0.0 --build-arg PAS_PKG="PASJava-tomEE-distribution.zip"

This generates the PAS TomEE image.

Docker Container Run

To start the containerized PasConfig application, run docker run format: (-v refers to volumes)

$ docker run -d --restart unless-stopped --network=host --privileged -v /path/to/the/externallibs:/usr/local/tomee/externallibs/ --env-file /path/to/the/pas_env.dat -p <App_External_Port>:<App_Container_Port> --name <Container_Name> --hostname localhost <Image_Name>:<Image_Tag> createServer.sh $DB_TYPE

docker run example:

For ORACLE:

$ docker run -d --restart unless-stopped --network=host --privileged -v /path/to/the/externallibs:/usr/local/tomee/externallibs/ --env-file /home/pasjava/pas_env.dat -p 7001:7001 --name oipa_tomee --hostname localhost oipa_tomee:12.2.0.0 createServer.sh ORACLE

For DB2:

$ docker run -d --restart unless-stopped --network=host --privileged -v /path/to/the/externallibs:/usr/local/tomee/externallibs/ --env-file /home/pasjava/pas_env.dat -p 7001:7001 --name oipa_tomee --hostname localhost oipa_tomee:12.2.0.0 createServer.sh DB2

For MSSQL:

$ docker run -d --restart unless-stopped --network=host -v /path/to/externallibs:/usr/local/tomee/externallibs/ --env-file /home/pasconfig/pas_env.dat -p 7003:7003 --name pas_tomee --hostname localhost pas_tomee:12.2.0.0 createServer.sh MSSQL

Ensure you define the Database names as below only (Case Sensitive)

  • Oracle Database: ORACLE

  • DB2 Database: DB2

  • SQL Database: MSSQL

Check the docker logs in the PUTTY console by executing the below command:

$ docker logs -f pas_tomee

Access the application when you see the Server startup in [xxxxxx] milliseconds message in the PUTTY console.

PASJAVA Log in URL

PAS Java Login URL

OIPA Homepage

OIPA Docker Homepage